package com.shyt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shyt.dao.SysDepartmentVo;
import com.shyt.dao.SysRoleVo;
import com.shyt.dao.SysUserVo;
import com.shyt.dao.UserLabelVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SysUserMapper extends BaseMapper<SysUserVo> {
    IPage<SysUserVo> selectSysUsers(IPage page);
    List<SysUserVo> selectSysUserByUsername(String username);

    List<SysUserVo> selectAllUsers(@Param("params") SysUserVo selectAllUsers);

    void deleteYh(@Param("params") SysUserVo deleteYh);

    List<SysDepartmentVo> selectDepartmentsForUser();

    void addUser(@Param("params")SysUserVo sysUserVo);

    List<SysRoleVo> selectAllRoles();

    void addRoles(@Param("params")UserLabelVo roles, @Param("id") Long id);

    void editUser(@Param("params")SysUserVo sysUserVo);

    void deleteByUserId(@Param("id")Long id);

    List<SysRoleVo> selectAllRolesHasAl(@Param("id") Long id);
}
